package com.myNovel.novel.controller.front;

import com.myNovel.novel.core.common.constant.ApiRouterConstants;
import com.myNovel.novel.core.common.resp.RestResp;
import com.myNovel.novel.dto.resp.HomeBookRespDto;
import com.myNovel.novel.service.HomeService;
import lombok.Generated;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author：Guxx
 * @Package：com.myNovel.novel.controller.front
 * @Date：2024/3/29 20:07
 * @Filename：HomeController
 */
@RestController
@RequestMapping(ApiRouterConstants.API_FRONT_HOME_URL_PREFIX)
@RequiredArgsConstructor
public class HomeController {
    private final HomeService homeService;

    @GetMapping("books")
    public RestResp<List<HomeBookRespDto>> listRestResp(){
        return homeService.listHomeBooks();
    }

}
